package com.lagou.initializer;

import org.springframework.web.WebApplicationInitializer;

import javax.servlet.ServletContainerInitializer;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.annotation.HandlesTypes;
import java.util.Set;

/**
 * @author 胡益文
 * @since 2021/9/15 17:59
 */
//将注解指定的Class对象作为参数传递到onStartup第一个参数
@HandlesTypes(value = {WebApplicationInitializer.class})
public class MySpringServletContainerInitializer implements ServletContainerInitializer {
    @Override
    public void onStartup(Set<Class<?>> set, ServletContext servletContext) throws ServletException {
        System.out.println(">>>>>>>>>>>>>>>>>>>>>>");
//        if(set!=null){
//            for (Class<?> aClass : set) {
//                System.out.println(aClass);
//            }
//        }
    }
}
